#
# Great Doctor Mod
# CvGDEventManager
# 

from CvPythonExtensions import *
import CvUtil

import CvEventManager
import sys
import PyHelpers
import CvMainInterface
import GreatDoctorUtils

gc = CyGlobalContext()	
objGreatDoctor = GreatDoctorUtils.GreatDoctorUtils()

PyPlayer = PyHelpers.PyPlayer
PyGame = PyHelpers.PyGame()

# globals
###################################################
class CvGDEventManager:
	def __init__(self, eventManager):
		# initialize base class

		eventManager.addEventHandler("BeginPlayerTurn", self.onBeginPlayerTurn)
		eventManager.addEventHandler("mouseEvent", self.onMouseEvent)


	def onMouseEvent(self, argsList):
		'mouse handler - returns 1 if the event was consumed'
		eventType,mx,my,px,py,interfaceConsumed,screens = argsList
		

		#gc.getPlayer(0).getCapitalCity().createGreatPeople(gc.getInfoTypeForString("UNIT_DOCTOR"), false, false)

	def onBeginPlayerTurn(self, argsList):
		'Called at the beginning of a players turn'

		iGameTurn, iPlayer = argsList

		objGreatDoctor.doAttemptTeachCraft(iPlayer)

